﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetduinoRemoteControlFake
{
    class RemoteControlStub : IRemoteControl
    {

        public string Ping()
        {
            return "pong";
        }

        private Random r = new Random();
        public double GetSensorData(SensorType t)
        {
            switch ( t )
            {
                default:
                case SensorType.IndoorTemp:
                    return (r.NextDouble() * 30);

                case SensorType.OutdoorTemp:
                    return (r.NextDouble() * 30);

                case SensorType.SolarHeaterTemp:
                    return (r.NextDouble() * 50);

                case SensorType.AirFlow:
                    return (r.NextDouble() * 100);
            }
            
        }

        public Modes GetMode()
        {
            int rand = r.Next(4);
            switch(rand)
            {
                case 0:
                    return Modes.Auto;

                case 1:
                    return Modes.Speed;

                case 2:
                    return Modes.SpeedTemp;

                default:
                case 3:
                    return Modes.SpeedTime;
            }
        }

        public int GetSpeed()
        {
            return r.Next(11);
        }

        public double GetToTemp()
        {
            return r.Next(31);
        }

        public int GetMin()
        {
            return r.Next(100);
        }


        public void SetModeAuto()
        {
            
        }

        public void SetModeSpeed(int speed)
        {
            
        }

        public void SetModeSpeedTemp(int speed, double temp)
        {
            
        }

        public void SetModeSpeedTime(int speed, int time)
        {
            
        }
    }
}
